@extends('lay.layout')
@section('content')
    <div class="seckill width">
        @if(count($list))
            @foreach($list as $item =>$value)
                <div class="item">
                    <div class="photos productPhotos">
                        <div class="copyText" style="width: 1px;height: 1px;overflow: hidden">
                            <div class="photo"><img   style="width: 155px;height: 220px"  src="{{all_image_url(json_decode($value->copywritingimage)->first)}}" alt="{{$value->goodstitle}}"></div>
                            <div>{{$value->goodstitle}}<br/>【原价{{$value->origprice}} 元】券后【{{$value->voucherprice}}
                                元】<br/>领券：{{$value->couponlink}}<br/>抢购：{{$value->goodslink}}
                                <br/>{!! writing_show($value->copywriting) !!}
                            </div>
                        </div>
                        <div class="cover">
                            <a href="{{ route('seckillDetail',['id'=>$value->id])}}"><img
                                        src="{{all_image_url(json_decode($value->coverimage)->main)}}" class="bigPhoto"
                                        width="340"
                                        height="340"
                                        alt="cover"></a>
                        </div>
                        <div class="thumb">
                            @foreach(image_judst($value->coverimage) as $kk  =>$vv)
                                <img src="{{$vv}}" data-big="{{$vv}}" width="60" height="60"
                                     alt="thmub">
                            @endforeach
                        </div>
                    </div>
                    <div class="content">
                        <div class="title">
                            <h1>【{{$value->shopname}}】{{$value->goodstitle}}</h1>
                            <p>
                            <span>@if($value->shoptype==2)<img src="/assets/images/icon-tmall.png"
                                                               alt="tmall">@endif</span>
                                <span>@if($value->activitytype==2)<img src="/assets/images/icon-qiang.png"
                                                                       alt="tmall">@endif</span>
                            </p>
                        </div>
                        <div class="tags">
                            @if($value->keyword)
                                @foreach(show_keyword($value->keyword) as $vvvv)
                                    <span>{{$vvvv}}</span>
                                @endforeach
                            @endif
                        </div>
                        @if(isset(json_decode($value->comment,true)[0]) && json_decode($value->comment,true)[0])
                            <ul class="feature">
                                @foreach(json_decode($value->comment,true) as $vvvv)
                                    <li>{{$vvvv}}</li>
                                @endforeach
                            </ul>
                        @endif

                        <div class="timers" data-date="{{$value->startdate}} {{$value->startfield}}">
                            @if(strtotime($value->startdate.''.$value->startfield)>time())
                                <i class="iconfont icon-shijian"></i>距开始时间：<b class="d">0</b>天<b class="h">0</b>小时<b
                                        class="m">0</b>分<b class="s">0</b>秒
                            @endif
                        </div>

                        <div class="prices @if(strtotime($value->startdate .' '.$value->startfield)>time()) green @endif ">
                            <div class="pa">券后<b>￥{{$value->voucherprice}}</b></div>
                            <div class="pb"><span>原价</span>
                                <del>￥{{$value->origprice}}</del>
                            </div>
                            <div class="pc">
                                @if($value->commissiontype==1) 通用
                                @elseif($value->commissiontype==2)定向
                                @elseif($value->commissiontype==3)鹊桥
                                @elseif($value->commissiontype==4)营销
                                @endif{{$value->commissionrate}}%
                            </div>
                            <div class="status"><span> @if(strtotime($value->startdate .' '.$value->startfield)>time())
                                        即将秒杀 @else 正在秒杀  @endif</span></div>
                        </div>
                        <div class="sales">
                            <p>月销量 {{$value->monthsales}}</p>
                            <p>秒杀增长 <b>{{$value->increment}}</b></p>
                        </div>
                        <div class="allowance">
                            <div class="count">
                                <div class="coupon">
                                    <div onclick="window.open('{{$value->couponlink}}')" style="cursor:pointer"><span>{{(int)$value->couponmoney}}
                                            元</span></div>
                                    <p class="process-count">剩余<b class="num">{{$value->couponremain}}</b>/总共<b
                                                class="total">{{$value->coupontotal}}</b></p>
                                </div>
                                <div class="process"><span
                                            style="width:{{$value->coupontotal==0?0:ceil((intval($value->coupontotal-$value->couponremain)/$value->coupontotal*100))}}%"></span>
                                </div>
                            </div>
                            <div id="foo_" style="z-index: 1000000"></div>
                            <div class="btn seckillCopy" data-clipboard-target="#foo_" data-copy='<img src="{{all_image_url(json_decode($value->coverimage)->main)}}" alt="{{$value->goodstitle}}">
                       {{$value->goodstitle}}<br/>【原价{{$value->origprice}} 元】券后【{{$value->voucherprice}}
                                    元】<br/>领券：{{$value->couponlink}}<br/>抢购：{{$value->goodslink}}
                                    <br/>{!! writing_show($value->copywriting) !!}
                                    '>复制文案</div>
                        </div>
                    </div>
                </div>

            @endforeach
        @else
            @include('lay.noData')
        @endif
    </div>
    <div id="foo_" style="z-index: 1000000"></div>
@endsection



